package gameStates.passes;

import com.jme.renderer.pass.BasicPassManager;
import com.jme.renderer.pass.Pass;
import com.jme.system.DisplaySystem;

public class PassManagerGameState extends AbsPassManagerState {
	
	private BasicPassManager manager;
	
	public PassManagerGameState() {
		super();
		manager = new BasicPassManager();
	}
	
	@Override
	public void render(float tpf) {
		manager.renderPasses(DisplaySystem.getDisplaySystem().getRenderer());
	}
	
	@Override
	public void update(float tpf) {
		manager.updatePasses(tpf);
	}
	
	@Override
	public void cleanup() {
		manager.clearAll();
	}
	
	@Override
	public BasicPassManager getPassManager() { return manager; }
	
	@Override
	public void addPass(Pass pass) { manager.add(pass); }
	
	@Override
	public void removePass(Pass pass) { manager.remove(pass); }
}